-- @owner: @songjing20
-- @date: 2022/7/12
-- @testpoint: 测试带concurrently关键字,在事务内外分别删除哈希索引,事务内删除时合理报错

--step1:创建表;expect:成功
drop table if exists t_hash_index_0043;
create table t_hash_index_0043(id01 int, id02 float(4)) with (orientation = row);

--step2:创建哈希索引;expect:成功
create index i_hash_index_0043_01 on t_hash_index_0043 using hash(id01);
create index i_hash_index_0043_02 on t_hash_index_0043 using hash(id02);

--step3:删除哈希索引(事务内运行);expect:合理报错
begin;/
drop index concurrently i_hash_index_0043_01;
commit;

--step4:删除哈希索引(未在事务内运行);expect:成功
drop index concurrently i_hash_index_0043_02;

--step5:清理环境;expect:成功
drop table t_hash_index_0043 cascade;